#coding: latin1

from django import forms
from antimicrobiano.models import Antimicrobiano
from antimicrobiano.models import Posologia
from antimicrobiano.models import Solicitacao
from antimicrobiano.models import Medico
from django.forms.models import ModelForm

class AntimicrobianoAdminForm(forms.ModelForm):
    class Meta:
        model = Antimicrobiano
    
    nome = forms.CharField(label='Nome:',
        widget=forms.TextInput(attrs={'size':'70'}))


class PosologiaAdminForm(forms.ModelForm):
    class Meta:
        model = Posologia
    
    fase_inicial = forms.FloatField(label='Fase Inicial:',
        widget=forms.TextInput(attrs={'size':'1'}))  

class SolicitacaoAdminForm(forms.ModelForm):
    class Meta:
        model = Solicitacao
    
    realizou_cultura = forms.BooleanField(required=False, widget=forms.CheckboxInput(attrs={"onclick":"document.getElementById('id_resultado').disabled = !this.checked"})) 
    paciente = forms.CharField(required=False)
    leito = forms.CharField(required=False)
    
   
    

class DispensaAdminForm(ModelForm):
    class Meta:
        model = Solicitacao 